
<?php

class ActivityReportProfile extends Zend_Db_Table{

    protected $_name = 'activity_report_profile';  //表名
    protected $_primary='id';		//主键名

    public function getActivityInfo($id){
        $select = $this->select();
        $select->where('id in (?)',$id);
        $result = $this->fetchAll($select)->toArray();
        if($result) return $result[0];
        else return null;
    }

    public function getActivityList($type){
        $select = $this->select();

        if($type == 'wait')
            $select->where('report_state in (?)',0);
        else if($type == 'end')
            $select->where('report_state in (?)',-1);
        $result = $this->fetchAll($select)->toArray();
        if($result) return $result;
        else return null;
    }


}